<template>
	<view class="container">
		<view class="header">
			<view class="title">用户反馈</view>
		</view>
		
		<view class="feedback-form">
			<view class="form-group">
				<view class="label">反馈类型</view>
				<view class="type-selector">
					<view class="type-item active">功能建议</view>
					<view class="type-item">内容问题</view>
					<view class="type-item">产品Bug</view>
					<view class="type-item">其他问题</view>
				</view>
			</view>
			
			<view class="form-group">
				<view class="label">反馈内容</view>
				<view class="textarea-wrap">
					<textarea class="feedback-textarea" placeholder="请详细描述您遇到的问题或建议，我们将尽快为您解决..." maxlength="500" />
					<view class="word-count">0/500</view>
				</view>
			</view>
			
			<view class="form-group">
				<view class="label">上传图片（选填）</view>
				<view class="upload-area">
					<view class="image-list">
						<view class="upload-btn">
							<up-icon name="camera" size="30" color="#909399"></up-icon>
							<text>添加图片</text>
						</view>
					</view>
					<view class="tip-text">最多上传4张图片，单张不超过5MB</view>
				</view>
			</view>
			
			<view class="form-group">
				<view class="label">联系方式</view>
				<input class="contact-input" placeholder="请留下您的手机号或邮箱，方便我们与您联系" />
			</view>
		</view>
		
		<view class="history-section">
			<view class="section-header">
				<view class="section-title">历史反馈</view>
				<view class="view-more">查看更多 <up-icon name="arrow-right" size="14" color="#909399"></up-icon></view>
			</view>
			
			<view class="history-list">
				<view class="history-item">
					<view class="history-top">
						<view class="history-type">功能建议</view>
						<view class="history-status success">已回复</view>
					</view>
					<view class="history-content">希望能增加更多的主题样式，当前的样式选择有限...</view>
					<view class="history-time">2023-03-10 14:23</view>
				</view>
				
				<view class="history-item">
					<view class="history-top">
						<view class="history-type">产品Bug</view>
						<view class="history-status waiting">处理中</view>
					</view>
					<view class="history-content">在使用过程中遇到了页面卡顿的问题，希望能优化一下...</view>
					<view class="history-time">2023-03-05 09:12</view>
				</view>
			</view>
		</view>
		
		<view class="action-btn">
			<button class="submit-btn">提交反馈</button>
		</view>
	</view>
</template>

<script setup>
	
</script>

<style lang="scss">
.container {
	min-height: 100vh;
	background-color: #f8f9fc;
	padding-bottom: 40rpx;
}

.header {
	padding: 30rpx;
	background-color: #ffffff;
}

.title {
	font-size: 36rpx;
	font-weight: 600;
	color: #303133;
}

.feedback-form {
	background-color: #ffffff;
	margin-top: 20rpx;
	padding: 20rpx 30rpx;
}

.form-group {
	margin-bottom: 30rpx;
}

.label {
	font-size: 28rpx;
	color: #303133;
	font-weight: 500;
	margin-bottom: 16rpx;
}

.type-selector {
	display: flex;
	flex-wrap: wrap;
}

.type-item {
	padding: 10rpx 30rpx;
	background-color: #f8f9fc;
	border-radius: 30rpx;
	font-size: 24rpx;
	color: #606266;
	margin-right: 20rpx;
	margin-bottom: 20rpx;
	
	&.active {
		background-color: #e8f3ff;
		color: #3c9cff;
	}
}

.textarea-wrap {
	position: relative;
	border: 1rpx solid #e4e7ed;
	border-radius: 10rpx;
	padding: 20rpx;
}

.feedback-textarea {
	width: 100%;
	height: 200rpx;
	font-size: 28rpx;
	color: #303133;
}

.word-count {
	position: absolute;
	right: 20rpx;
	bottom: 20rpx;
	font-size: 24rpx;
	color: #909399;
}

.upload-area {
	margin-top: 10rpx;
}

.image-list {
	display: flex;
	flex-wrap: wrap;
}

.upload-btn {
	width: 160rpx;
	height: 160rpx;
	border: 1rpx dashed #c0c4cc;
	border-radius: 10rpx;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	
	text {
		font-size: 24rpx;
		color: #909399;
		margin-top: 10rpx;
	}
}

.tip-text {
	font-size: 24rpx;
	color: #909399;
	margin-top: 16rpx;
}

.contact-input {
	border: 1rpx solid #e4e7ed;
	border-radius: 10rpx;
	height: 80rpx;
	padding: 0 20rpx;
	font-size: 28rpx;
	color: #303133;
}

.history-section {
	background-color: #ffffff;
	margin-top: 20rpx;
	padding: 30rpx;
}

.section-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20rpx;
}

.section-title {
	font-size: 30rpx;
	color: #303133;
	font-weight: 600;
}

.view-more {
	font-size: 24rpx;
	color: #909399;
	display: flex;
	align-items: center;
}

.history-list {
	margin-top: 20rpx;
}

.history-item {
	padding: 20rpx;
	background-color: #f8f9fc;
	border-radius: 10rpx;
	margin-bottom: 20rpx;
}

.history-top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10rpx;
}

.history-type {
	font-size: 24rpx;
	color: #3c9cff;
	background-color: #e8f3ff;
	padding: 4rpx 16rpx;
	border-radius: 20rpx;
}

.history-status {
	font-size: 24rpx;
	
	&.success {
		color: #19be6b;
	}
	
	&.waiting {
		color: #ff9900;
	}
}

.history-content {
	font-size: 28rpx;
	color: #303133;
	margin-bottom: 10rpx;
	line-height: 1.5;
}

.history-time {
	font-size: 24rpx;
	color: #909399;
}

.action-btn {
	padding: 40rpx 30rpx;
}

.submit-btn {
	background: linear-gradient(135deg, #44d7b6, #19be6b);
	color: #ffffff;
	border-radius: 10rpx;
	padding: 20rpx 0;
	font-size: 32rpx;
	font-weight: 500;
}
</style> 